﻿@{
    ViewBag.WLTJDGuanLiView = "active";
    ViewBag.Title = "酒店管理";
    Layout = "~/Views/Shared/_layout_wenlvting.cshtml";
}

<div class="sousuo">
    <div class="soubox ">
        <input type="text" required="required" placeholder=" 请输入酒店类型、名称、联系人、电话等相关信息" class="height50" v-model="txtsearch">
    </div>

    <div class="sou_tj sou_mar02">
    <button class="sou_btn" v-on:click="GetJDInfoP(-2)"> 搜索</button>
    </div>
</div>
<div class="tab_fill">
    <table width="95%" border="0" cellspacing="0" cellpadding="0" class="tab_tb">
        <tr>
            <td class="top_bt bt_w5">序号</td>
            <td class="top_bt ">酒店名称</td>
            <td class="top_bt bt_w15">酒店类型</td>
            <td class="top_bt bt_w15">所属区域</td>
            <td class="top_bt bt_w15">联系电话</td>
            <td class="top_bt bt_w20">操作</td>
        </tr>
        <tr v-for="(item,index) in lisjd">
            <td>{{++index}}</td>
            <td>{{item.jd_name}}</td>
            <td>{{item.jingying_leixing_huafen}}</td>
            <td>{{item.areaName}}</td>
            <td>{{item.dianhua}}</td>
            <td>
                <button class="btn btn-xs btn-primary">基本情况</button>
                <button class="btn btn-xs btn-primary">所有填报</button>
                <button class="btn btn-xs btn-primary">账户管理</button>
            </td>
        </tr>
        
    </table>
</div>
<div style="text-align:center;margin-top:20px; margin-bottom:20px;" v-html="pageHtml"></div>
<div v-if="msg!=''" style="text-align:center;margin-top:20px; margin-bottom:20px; color:gray">{{msg}}</div>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            pageHtml: "",
            msg:"",
            lisjd: [],
            txtsearch:"",

        },
        methods: {
            
        }
    })

    $(function(){
        GetJDInfoP(-2);
    });
    function GetJDInfoP(init, pageIndex, pageSize) {
        if (init == -2) {
            vm.msg = "";
            pageIndex = 1;
            pageSize = 10;
        }
        var pa = { pageIndex: pageIndex, pageSize: pageSize, txtsearch: vm.txtsearch };
        $.post("/WenLvTing/GetJDInfoP", pa, function (res) {
            vm.pageHtml = res.pageHtml;
            vm.lisjd = res.lisjd;
            if (vm.lisjd.length <= 0) {
                vm.msg = "没有查询到任何数据！";
            }
            else {
                vm.msg = "";
            }
        });
    }
</script>
